﻿using JTTD.Domain.Dtos;
using JTTD.Domain.Dtos.UserInfo;
using System.Collections.Generic;
using System.Threading.Tasks;
using JTTD.Domain.Dtos.Account.Request;
using JTTD.Domain.Dtos.Account.Response;
using JTTD.Domain.Dtos.UserInfo.Request;
using JTTD.Domain.Dtos.UserInfo.Response;
using JTTD.Domain.Dtos.CompanyUserInfo.Response;

namespace JTTD.Domain.IService
{
   /// <summary>
   /// 用户信息服务
   /// </summary>
    public interface IUserInfoService : IDependency
    {
        /// <summary>
        /// 用户注册
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        Task<ApiResult<int>> UserRegister(UserRegisterRequestDto model);
        /// <summary>
        /// 修改用户
        /// </summary>
        /// <param name="userId"></param>
        /// <param name="model"></param>
        /// <returns></returns>
        Task<ApiResult<bool>> UpdateUser(int userId,UpdateUserRequestDto model);
        /// <summary>
        /// 查询单个用户
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        Task<ApiResult<UserInfoResponseDto>> SearchUserInfo(SearchUserInfoRequestDto model);
        /// <summary>
        /// 分页查询用户
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        Task<ApiResult<PageResult<UserInfoResponseDto>>> SearchUserInfoPage(SearchUserInfoPageRequestDto model);

        /// <summary>
        /// 用户验证
        /// </summary>
        /// <param name="account"></param>
        /// <returns></returns>
        Task<ApiResult<AccountResponseDto>> UserAccount(AccountRequestDto account);
        
        /// <summary>
        /// 手机号注册
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        Task<ApiResult<int>> UserRegisterByPhone(UserRegisterRequestDto model);

        ///// <summary>
        ///// 重置用户密码
        ///// </summary>
        ///// <param name="userId"></param>
        ///// <returns></returns>
        //Task<ApiResult<bool>> ResetUserPassword(int userId);

        ///// <summary>
        ///// 修改用户密码
        ///// </summary>
        ///// <param name="userId"></param>
        ///// <param name="dto"></param>
        ///// <returns></returns>
        //Task<ApiResult<bool>> ModifyUserPassword(int userId, UpdateUserPwdRequestDto dto);

        /// <summary>
        /// 用户关注店家
        /// </summary>
        /// <param name="shopId"></param>
        /// <param name="userId"></param>
        /// <returns></returns>
        Task<ApiResult<bool>> AttentionShop(int shopId, int userId);

        /// <summary>
        /// 删除用户
        /// </summary>
        /// <param name="userId"></param>
        /// <returns></returns>
        Task<ApiResult<bool>> DeleteUserInfo(int userId);

        /// <summary>
        /// 用户取消关注店家
        /// </summary>
        /// <param name="shopId"></param>
        /// <param name="userId"></param>
        /// <returns></returns>
        Task<ApiResult<bool>> CancelAttentionShop(int shopId, int userId);

        /// <summary>
        /// 用户查询自己关注的店家
        /// </summary>
        /// <param name="userId"></param>
        /// <param name="search"></param>
        /// <returns></returns>
        Task<ApiResult<PageResult<GetShopUserDto>>> GetUserAttentionShops(int userId, BaseSearch search);

        /// <summary>
        /// 检查用户是否完善信息
        /// </summary>
        /// <param name="userId"></param>
        /// <returns></returns>
        Task<ApiResult<bool>> CheckUserInfo(int userId);
    }
}
